package Utils;

import domain.User;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;

public class ReadUsers {

    public static ArrayList<User> readUsers() throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("Users.dat"));
        ArrayList<User> users = (ArrayList<User>) ois.readObject();
        ois.close();
        return users;
    }

}
